<template>
  <div>
    <el-form class="r-text">
      <el-form-item v-for="(opItem, index) of operateList" :key="index">
        {{ index + 1 }}. {{ opItem.createdDate }}
        <span class="user-name">
          {{ opItem.userName || opItem.userAlias }}
        </span>
        {{ opItem.action }}
        <span v-if="opItem.changeCode" class="change-content">
          {{ opItem.changeCode }} -> {{ opItem.valueAfter }}
        </span>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { mapState } from 'vuex'

export default {
  inject: ['workOrderId'],
  data() {
    return {}
  },
  computed: mapState('workOrder', ['operateList']),
  methods: {}
}
</script>

<style lang="scss" scoped>
.user-name {
  font-weight: 600;
}
.change-content {
  word-wrap: break-word;
}
</style>
